package com.oocl.oopdemo.heros;

import java.util.List;

import com.oocl.oopdemo.herosInterface.Attackable;
import com.oocl.oopdemo.herosMap.Coordinate;
import com.oocl.oopdemo.herosbehavior.AttackAction;
import com.oocl.oopdemo.herosbehavior.Technical;

public abstract class Hero {
	private int red;
	private int blue;
	private List<Technical> technicals;
	public int getRed() {
		return red;
	}
	public void setRed(int red) {
		this.red = red;
	}
	public int getBlue() {
		return blue;
	}
	public void setBlue(int blue) {
		this.blue = blue;
	}
	@SuppressWarnings("rawtypes")
	public List getTechnicals() {
		return technicals;
	}
	public void setTechnicals(List<Technical> technicals) {
		this.technicals = technicals;
	}
	
	public Coordinate walk(String orientation,int steps){
		Coordinate c=new Coordinate();
		switch(orientation){
		case "up":
			c.setY(c.getY()+steps);
			break;
		case "down":
			c.setY(c.getY()-steps);
			break;
		case "left":
			c.setX(c.getX()-steps);
			break;
		case "right":
			c.setX(c.getX()+steps);
			break;
		}
	
		return c;
	}
	
	
    public boolean isAlive(){
		return false;
		
	}
	
	
	public void attack(Attackable target,AttackAction action){
		target.underAttack(action);
	}
	
	public void underAttack(AttackAction action){
		
	}
	public void releaseTechnical(int index) {
		// TODO Auto-generated method stub
		this.technicals.get(index);
	}
}
